{% extends "base.html" %}
{% block page %}
    <script language="JavaScript" xmlns="http://www.w3.org/1999/html">
    function myrefresh()
    {
       window.location.reload();
    }
    setTimeout('myrefresh()',600000); //指定60秒刷新一次
    </script>
    <div class="div"><p>线上业务接口流量TOP</p></div>
    <div style="margin-top: 4%;width: 100%" align="center">
        {% if Tra_cli_url_minute_datas and Tra_ser_url_minute_datas %}
            {% for Key in Tra_cli_url_minute_datas %}
                <div style="display: inline;margin-left:1%;border:1px solid #e5e5e5">
                    <p align="center"><strong><font color="red">{{ Key }}请求接口流量TOP</font></strong></p>
                        <table class="datalist" border="1" align="center">
                            <tr align="center">
                                <td>请求接口</td>
                                <td>平均流量(Mbps)</td>
                            </tr>
                            {% for val in Tra_cli_url_minute_datas[Key] %}
                                <tr class="altrow">
                                    <td style="width:700px;overflow:hidden;text-align: left" >{{val[0]}}</td>
                                    <td style="width:60px;overflow:hidden;text-align: center" >{{val[1]}}</td>
                                </tr>
                            {% endfor %}
                        </table>
                    <p align="center"><strong><font color="blue" >{{ Key }}接口响应流量TOP</font></strong></p>
                        <table class="datalist" border="1" align="center">
                            <tr align="center">
                                <td>响应接口</td>
                                <td>平均流量(Mbps)</td>
                            </tr>
                            {% for val in Tra_ser_url_minute_datas[Key] %}
                                <tr class="altrow">
                                    <td style="width:700px;overflow:hidden;text-align: left" >{{val[0]}}</td>
                                    <td style="width:60px;overflow:hidden;text-align: center" >{{val[1]}}</td>
                                </tr>
                            {% endfor %}
                        </table>
                </div>
            {% endfor %}
        {% endif %}
    </div>
{% endblock page %}
